package com.nulldev.util.internal;

import com.nulldev.util.event.Event;
import com.nulldev.util.event.EventManager;

public class IncompatJDKEvent implements Event {
	
	private Throwable t;
	private double ejvm = -1;
	private String method, cls;
	private final Object us;
	
	public IncompatJDKEvent(final Throwable t, final Object us) {
		this.t = t;
		this.us = us;
	}
	
	public Object getObject() {
		return this.us;
	}
	
	public Throwable getThrowable() {
		return this.t;
	}
	
	public void setExpectedJVM(final double ejvm) {
		this.ejvm = ejvm;
	}

	public double expectedJVM() {
		return this.ejvm;
	}

	public String getMethod() {
		return this.method;
	}
	
	public String getCls() {
		return this.cls;
	}
	
	public void setEData(final String cls, final String method) {
		this.method = method;
		this.cls = cls;
	}

	@Override
	public void call() {
		EventManager.call(this);
	}
}
